package cn.yza.设计模式.装饰者模式.eg1;

/** 具体装饰者角色 房子装饰者
 *  动态地添加职责的对象。
 * @author Honglixi
 * @create 2021-11-02 13:33
 */
public class HouseDecoratorImpl extends AttachedPropertiesDecorator{
    private String house = "有房";

    public HouseDecoratorImpl(Man man) {
        super(man);
    }

    public void addHouse() {
        System.out.println(house + " ");
    }

    @Override
    public void getManDesc() {
        super.getManDesc();
        addHouse();
    }
}